package c_control;

class IfTest
{
	public static void main(String str[])
	{
		int kor=70;
		int eng=80;
		int mat=90;

		int tot=0;
		double avg=0;
		char hak;

		tot=kor+eng+mat;
		avg=tot/3.0;

		if(avg>=90) { hak='A' ; }
		else if(avg>=80 && avg<90) { hak='B' ;}
		else if(avg>=70 && avg<80) { hak='C' ;}
		else if(avg>=60 && avg<70) { hak='D' ;}
		else { hak='F' ; }

		System.out.println("kor=" + kor);
		System.out.println("eng=" + eng);
		System.out.println("mat=" + mat);
		System.out.println("tot=" + tot);
		System.out.println("avg=" + avg);
		System.out.println("hak=" + hak);
	}
}; 
